package com.example.demo.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.demo.entity.BmXtloginfo;
import com.example.demo.service.BmXtloginfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author suliwei
 * @description:
 * @date 2024/11/15 15:49
 */
@Slf4j
@RestController
@RequestMapping("/bmXtloginfo")
public class BmXtloginfoController {

    @Resource
    private BmXtloginfoService bmXtloginfoService;

    @PostMapping("/queryByPage")
    public List<BmXtloginfo> queryByPage(@RequestBody BmXtloginfo bmXtloginfo) {
        return this.bmXtloginfoService.queryByPage(bmXtloginfo);
    }

    @PostMapping("/postMoreParam")
    public JSONObject postMoreParam(@RequestBody JSONObject object) {
        log.info("【*调用接口*】：postMoreParam; 入参: "+ object);
        return object;
    }

    @PostMapping("/posttest")
    public String posttest(String paramOne, String paramTwo) {
        log.info("【*调用接口*】：posttest; 入参: " + paramOne +"-"+ paramTwo);
        return paramOne +"-"+ paramTwo;
    }

    @GetMapping("/gettest")
    public String gettest() {
        log.info("【*调用接口*】：gettest");
        return "gettest";
    }
}
